/**
 * 
 */
package las.dao.entity;

import java.util.Date;

/**
 * @author shayne
 * 
 */
public class EventAchievement {
	private Integer id;
	private Integer isEffect;
	private Integer eventId;
	private Integer achId;

	private Event event;
	private Achievement achievement;

	private Date recordTime;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}



	public Integer getIsEffect() {
		return isEffect;
	}

	public void setIsEffect(Integer isEffect) {
		this.isEffect = isEffect;
	}

	public Integer getEventId() {
		return eventId;
	}

	public void setEventId(Integer eventId) {
		this.eventId = eventId;
	}

	public Integer getAchId() {
		return achId;
	}

	public void setAchId(Integer achId) {
		this.achId = achId;
	}

	public Event getEvent() {
		return event;
	}

	public void setEvent(Event event) {
		if(event == null){
			this.eventId = null;
		} else {
			this.eventId = event.getEventId();
		}
			
		this.event = event;
	}

	public Achievement getAchievement() {
		return achievement;
	}

	public void setAchievement(Achievement achievement) {
		if(achievement == null){
			this.achId = null;
		}else{
			this.achId = achievement.getAchId();
		}
		
		this.achievement = achievement;
	}

	public Date getRecordTime() {
		return recordTime;
	}

	public void setRecordTime(Date recordTime) {
		this.recordTime = recordTime;
	}

	@Override
	public String toString() {
		// TODO Auto-generated method stub
		
		return "{EventAchievement: " + this.getEventId() + ", "
				+ this.getAchId() + ", " + this.getIsEffect()
				+ ", " + this.getEvent() + ", " + this.getAchievement() + "}";
	}

}
